<go> element

The <go> element is a task element that instructs the device to open a specified URL. If the URL specifies a particular card, the device displays that card. If the URL specifies a deck, the device displays the first card in that deck.

Syntax

where content represents the variables to set when opening the specified URL:
 
content You can optionally specify one or more variables in a <go> statement: 
<setvar>  (see <setvar> element


IMPORTANT     Unlike other WML elements that have content, specifying content for the <go> element is optional. If you do not specify any content, you must use the syntax <go attributes/> rather than <go attributes>content</go>

Attributes

 
href The URL to open. 
send
referer
true | false

Specifies whether the device should include the deck URL in the URL request. Specifying sendreferer="true" causes the device to set the HTTP_REFERER header to the relative URL of the requesting deck. If you want to restrict access to trusted services, decks that request specified URLs must set this option to TRUE

method get | post

Specifies the HTTP submission method. Specifying method="post" causes the UP.Link Server to transcode variable data to the character set specified by the HTTP headers defined in your application. You should perform this transcoding if non-ASCII characters (specifically UTF-8) may exist in the data being passed.  If you do not specify the method attribute but do specify the postfield nested element, the device automatically uses the post method. 

accept-charset Specifies the character encodings that your application can handle. The device uses this attribute to transcode data specified by the postfield element. The UP.Link Server assumes UTF-8 as the default encoding (of which US-ASCII is a subset), so WML services in the United States, Canada, or Australia do not need to use this attribute. You can also omit this attribute if you specify your character set(s) in the HTTP response header. Note that the accept-charset attribute overrides any character encodings you specify in the HTTP header. 

The syntax for this attribute is a comma- or space-delimited list of IANA character sets. For example, accept-charset="UTF-8, US-ASCII, ISO-8859-1"


 

Example

The following WML code illustrates the syntax for the <go> element: